﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using System.Data;
using Models;

namespace BLL
{
    public class SetBasicInfoBLL
    {
        SetBasicInfoDAL sd = new SetBasicInfoDAL();
        //获取已存设置信息
        public string getInfo(string name)
        {
            return sd.getInfo(name);
        }

        //设置信息更新至数据库
        public string setInfo(string name,string text)
        {
            int i = sd.setInfo(name,text);
            if (i > 0)
            {
                return "更新成功！";
            }
            else
            {
                return "更新失败！";
            }
        }
        /// <summary>
        /// 获取微信基础设置信息
        /// </summary>
        /// <returns></returns>
        public DataTable getWechatBaseInfo()
        {
            return sd.getWechatBaseInfo();
        }
        /// <summary>
        /// 设置微信基础设置信息
        /// </summary>
        /// <param name="wb"></param>
        public int setWechatBaseInfo(WechatBaseInfo wb)
        {
            return sd.setWechatBaseInfo(wb);
        }
    }
}
